package com.wry.rpc;

import com.wry.dto.AccountDeductedDTO;
import com.wry.util.ApiResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * <h1> 账户服务rpc <h1>
 *
 * @author 魏如元
 * @since 2022/10/11
 */
@FeignClient( url = "${account.server.url}",name = "account-server")
public interface AccountRpcService {

    @PostMapping(value = "account/deducted", consumes = MediaType.APPLICATION_JSON_VALUE, produces = MediaType.APPLICATION_JSON_VALUE)
    ApiResult<String> deductedAccount(@RequestBody AccountDeductedDTO deductedDTO);
}
